import time

from selenium.webdriver.common.by import By
from selenium.webdriver.support.wait import WebDriverWait
from selenium.webdriver.support import expected_conditions as ec
from selenium import webdriver
driver = webdriver.Chrome()
driver.get('https://www.baidu.com')
try:
    WebDriverWait(driver,5,1).until(ec.title_contains('收购'),message='彳亍')
except :
    print('s')

